﻿<%@ Page Title="Venta Externa - Stock por Modelo" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmVentaExternaStockModeloActualizar.aspx.cs" Inherits="Crosland.Automotriz.Web.Vehiculos.wFrmVentaExternaStockModeloActualizar" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx1" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx1" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx1" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">


    <script type="text/javascript">

        function MostrarAlerta() {
            popupErrores.Show();
        }

    </script>

    <div class="main-header" style="width:100%;">
        <div class="main-titulo" style="text-align: left">
            Venta Externa - Stock Mensual Por Modelo</div>
    </div>


    <div style="padding: 10px">

    <table width="100%">
        <tr>
            <td width="105">
                <dx1:ASPxButton ID="btnGrabar" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Grabar" 
                    Width="100px" onclick="btnGrabar_Click">
                    <Image Url="~/Images/save_16.gif">
                    </Image>
                </dx1:ASPxButton>
            </td>
            <td>
                <dx1:ASPxButton ID="btnSalir" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                    Width="100px" onclick="btnSalir_Click">
                    <Image Url="~/Images/logout.png">
                    </Image>
                </dx1:ASPxButton>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <hr />
            </td>
        </tr>
    </table>
        <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" 
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
            GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" HeaderText="" 
            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100%">
            <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" 
                PaddingTop="10px" />
            <HeaderStyle>
            <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" 
                PaddingTop="3px" />
            </HeaderStyle>
            <PanelCollection>
<dx1:PanelContent runat="server" SupportsDisabledAttribute="True">
    <table width="100%">
        <tr>
            <td colspan="7">
                <table>
                    <tr>
                        <td style="width: 34px">
                            <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="Black" 
                                Text="Año:"></asp:Label>
                        </td>
                        <td style="width: 58px">
                            <asp:Label ID="lblAnio" runat="server" Font-Bold="True" ForeColor="Black"></asp:Label>
                        </td>
                        <td style="width: 34px">
                            <asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="Black" 
                                Text="Mes:"></asp:Label>
                        </td>
                        <td style="width: 59px">
                            <asp:Label ID="lblMes" runat="server" Font-Bold="True" ForeColor="Black"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 37px">
                <asp:Label ID="Label5" runat="server" ForeColor="Black" Text="Marca:"></asp:Label>
            </td>
            <td style="width: 155px">
                <dx:ASPxComboBox ID="cboMarca" runat="server" AutoPostBack="True" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    OnSelectedIndexChanged="cboMarca_SelectedIndexChanged" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="150px">
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <ButtonStyle Width="20px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxComboBox>
            </td>
            <td style="width: 34px">
                <asp:Label ID="Label3" runat="server" ForeColor="Black" Text="Modelo:"></asp:Label>
            </td>
            <td style="width: 60px">
                <dx:ASPxComboBox ID="cboModelo" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="150px">
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <DropDownButton Width="20px">
                    </DropDownButton>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxComboBox>
            </td>
            <td style="width: 45px">
                <asp:Label ID="Label4" runat="server" ForeColor="Black" Text="Stock:"></asp:Label>
            </td>
            <td style="width: 55px">
                <dx:ASPxSpinEdit ID="seStock" runat="server" AllowNull="False" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="21px" Number="1" NumberType="Integer" 
                    Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Width="50px">
                    <SpinButtons HorizontalSpacing="0">
                    </SpinButtons>
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxSpinEdit>
            </td>
            <td>
                <dx:ASPxButton ID="btnAgregar" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" OnClick="btnAgregar_Click" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Agregar" 
                    Width="100px">
                    <Image Url="~/Images/add2.png">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
                </dx1:PanelContent>
</PanelCollection>
        </dx:ASPxRoundPanel>
        <br />
    <dx:ASPxGridView ID="gv" runat="server" AutoGenerateColumns="False" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" Width="100%" KeyFieldName="ID_MODELO" 
            onrowdeleting="gv_RowDeleting">
        <Columns>
            <dx:GridViewCommandColumn ButtonType="Image" Caption="Quitar" 
                VisibleIndex="4" Width="50px">
                <DeleteButton Visible="True">
                    <Image Url="~/Images/delete.png">
                    </Image>
                </DeleteButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn Caption="Modelo" FieldName="DES_MODELO" 
                VisibleIndex="2" Width="250px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Stock" FieldName="STOCK" VisibleIndex="3" 
                Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="ID_MODELO" FieldName="ID_MODELO" 
                Visible="False" VisibleIndex="0">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Marca" FieldName="DES_MARCA" 
                VisibleIndex="1" Width="100px">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsBehavior AllowDragDrop="False" AllowFocusedRow="True" 
            AllowGroup="False" AllowSelectByRowClick="True" AllowSelectSingleRowOnly="True" 
            AllowSort="False" ConfirmDelete="True" />
        <SettingsPager Mode="ShowAllRecords" Visible="False">
        </SettingsPager>
        <SettingsText CommandDelete="¿Seguro de quitar este modelo?" />
        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesPager>
            <PageNumber ForeColor="#3E4846">
            </PageNumber>
            <Summary ForeColor="#1E395B">
            </Summary>
        </StylesPager>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
    <dx1:ASPxPopupControl ID="popupErrores" runat="server" AllowDragging="True" 
                    ClientInstanceName="popupErrores" CloseAction="CloseButton" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                    EnableViewState="False" HeaderText="Mensaje" Modal="True" 
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
              Width="300px" EnableHotTrack="False">
                
                    <HeaderImage Url="~/Images/icon_message.png">
                    </HeaderImage>
                
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                    </LoadingPanelImage>
                    <HeaderStyle>
                    <Paddings PaddingLeft="7px" />
                    </HeaderStyle>
                
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                
                 <ContentCollection>
<dx1:popupcontrolcontentcontrol ID="PopupControlContentControl2" runat="server" 
                         SupportsDisabledAttribute="True">

    <br />
      <dx1:aspxpanel ID="ASPxPanel3" runat="server" DefaultButton="btCreate">
                    <PanelCollection>
                        <dx1:panelcontent ID="PanelContent2" runat="server">
                        <table width="100%">
                        <tr>
                        <td align="center" valign="middle">
                        
                        
                        
                            <asp:Label ID="lblMensaje" runat="server"></asp:Label>
                            <br /> &nbsp;</td>
                        
                        </tr>
                        <tr>
                        <td align="center">
                        
                       
                            <dx1:aspxbutton ID="ASPxButton6" runat="server" AutoPostBack="False" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Aceptar" 
                                Width="10px">
                                <ClientSideEvents Click="function(s, e) {
	popupErrores.Hide();
}" />
                                <Image Url="~/Images/ok.png">
                                </Image>
                            </dx1:aspxbutton>
                        
                        </td>
                        
                        </tr>
                        
                        
                        </table>




                 </dx1:panelcontent>
    </PanelCollection>
   </dx1:aspxpanel>
   </dx1:popupcontrolcontentcontrol>
</ContentCollection>
                </dx1:ASPxPopupControl>

    </div>


</asp:Content>
